<?php
/**
 * Created by PhpStorm.
 * User: zhan
 * Date: 2017/11/10  13:38
 */
namespace app\api\controller;
class Goods extends Base{
    //检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => [
            'only' => ''//except
        ],
    ];


    /**
     * 商品列表
     */
    public function index()
    {
        $result =  (new \app\api\logic\Goods())->index();
        return $this->ajaxReturn($result);
    }

    /**
     * 搜索商品
     */
    public function search_goods()
    {
        $search_goods =  (new \app\api\logic\Goods())->search_goods();
        return $this->ajaxReturn($search_goods);
    }


    /**
     * 分类列表
     */
    public function category()
    {
        $result =  (new \app\api\logic\Goods())->category();
        return $this->ajaxReturn($result);
    }

    /**
     * 详情
     */
    public function detail()
    {
        $result =  (new \app\api\logic\Goods())->detail();
        return $this->ajaxReturn($result);
    }

    /**
     * 规格列表
     */
    public function spec()
    {
        $result =  (new \app\api\logic\Goods())->spec();
        return $this->ajaxReturn($result);
    }


}